
class ApiRes {
    static success(response, data = null) {
        response.json({
            success: true,
            message: '操作成功',
            data,
            error: null
        })
    }

    static fail(response, message, error = null) {
        response.json({
            success: false,
            message,
            data: null,
            error
        })
    }
}

module.exports = ApiRes